package com.whfc.emp.cncit.entity;


import com.whfc.emp.cncit.constant.CncitConst;

/**
 * @author : qzexing
 * @version : 1.0
 * @date : 2020/7/1 17:33
 */
public class CncitUpMsgPSA extends CncitUpMsg {

    /**
     * 参数类型
     */
    private String type;

    public CncitUpMsgPSA(String deviceCode, String type) {
        this.deviceCode = deviceCode;
        this.type = type;
    }

    @Override
    public String getCmd() {
        return CncitConst.UP_CMD_PSA;
    }

    public String getType() {
        return type;
    }

    @Override
    public int getDataLength() {
        //$0F,PSA,0001,TTSD,#
        return getCmd().length() + 1 + deviceCode.length() + 1 + type.length() + 1 + 1;
    }
}
